home *** CD-ROM | disk | FTP | other *** search
- BTEST(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- BBTTEESSTT - Tests a bit of an integer value
-
- SSYYNNOOPPSSIISS
- BBTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- Fortran 90
-
- DDEESSCCRRIIPPTTIIOONN
- The BBTTEESSTT intrinsic function tests a bit of an integer value. It
- accepts the following arguments:
-
- _i Must be of type integer.
-
- _p_o_s Must be of type integer. It must be nonnegative and be less
- than BBIITT__SSIIZZEE((_i)).
-
- BBTTEESSTT is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- RREETTUURRNN VVAALLUUEESS
- The result is of type default logical. The result has the value TTRRUUEE
- if bit _p_o_s of _i has the value 1. It has the value FFAALLSSEE if bit _p_o_s of
- _i has the value 0. The bit model defines the interpretation of an
- integer value as a sequence of bits. This model is described in the
- MMOODDEELLSS(3I) man page.
-
- EEXXAAMMPPLLEESS
- Example 1: BBTTEESSTT((88,, 33)) has the value TTRRUUEE.
-
- Example 2: BBTTEESSTT((88__SSHHOORRTT,, 33)) has the value TTRRUUEE.
-
- Example 3: Assume that AA has the following value:
-
- | 1 2 |
- | 3 4 |
-
- The value of BBTTEESSTT((AA,, 22)) is as follows:
-
- | false false |
- | false true |
-
- The value of BBTTEESSTT((22,, AA)) is as follows:
-
- | true false |
- | false false |
-
- SSEEEE AALLSSOO
- MMOODDEELLSS(3I)
-
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-